<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	function fo() {
		document.getElementById("username").focus();
	}

	function validate() {
		var value = document.getElementById("username").value;
		alert(value);
		return true;
	}

	function cli() {
		var myform = document.getElementById("myForm");
		alert(myform);
		for ( var i = 0; i < myform.length; i++) {
			alert(myform[i].name);
		}
	}
</script>
</head>
<body onload="fo()">

	<form id="myForm" action="success.html" onsubmit="return validate()">
		username:<input id="username" type="text" name="username" /><br />
		password:<input id="password" type="text" name="password" /><br /> <input
			type="reset" value="reset" /> <input type="submit" value="submit"
			accesskey="s" /><br />
	</form>
	<button id="dianji" onclick="cli()">dianji</button>

	<form>
		<select name="cars">
			<option value="volvo">Volvo</option>
			<option value="saab">Saab</option>
			<option value="fiat" selected="selected">Fiat</option>
			<option value="audi">Audi</option>
		</select>
	</form>
</body>
</html>